Expose supported types in ComparatorRegistry#951
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes the set of comparator key types registered in ComparatorRegistry via a new types() accessor, and updates the repository version and generated dependency reports. It also includes several build tooling updates in buildSrc that affect version parsing, dependency report generation, and temporary directory handling.
Changes:
- Add
ComparatorRegistry.types(): Set<Class<*>>returning a defensive snapshot of registered comparator key types, plus new tests. - Bump publishing version to
2.0.0-SNAPSHOT.423and regenerate dependency report artifacts underdocs/dependencies/. - Update build tooling (
buildSrc) aroundextra.set(...)parsing, dependency report version selection based on resolution, and temp directory utilities/tests.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumps the published version and migrates to extra.set(...). |
| docs/dependencies/pom.xml | Regenerated dependency POM reflecting updated dependency versions/metadata. |
| docs/dependencies/dependencies.md | Regenerated dependency/license report with updated version/date stamps. |
| buildSrc/src/test/kotlin/io/spine/gradle/VersionGradleFileSpec.kt | Adds test coverage for parsing extra.set(...) declarations. |
| buildSrc/src/test/kotlin/io/spine/gradle/report/pom/DependencyWriterSpec.kt | Expands tests to validate resolved-vs-declared dependency version reporting. |
| buildSrc/src/test/kotlin/io/spine/gradle/fs/SpineTempDirSpec.kt | New tests for per-JVM temp directory behavior. |
| buildSrc/src/test/kotlin/io/spine/gradle/fs/LazyTempPathSpec.kt | New tests for lazy temp path creation and placement. |
| buildSrc/src/main/kotlin/write-manifest.gradle.kts | Adjusts task registration style for exposeManifestForTests. |
| buildSrc/src/main/kotlin/uber-jar-module.gradle.kts | Updates task wiring for publishing fat JAR to Maven Local. |
| buildSrc/src/main/kotlin/kmp-module.gradle.kts | Adjusts KMP source set access and configures jvmTest execution/logging. |
| buildSrc/src/main/kotlin/jvm-module.gradle.kts | Updates task registration style for generated-source cleanup. |
| buildSrc/src/main/kotlin/io/spine/gradle/VersionGradleFile.kt | Extends version file parsing to support extra.set(...) alongside legacy by extra(...). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ProjectMetadata.kt | Refactors property delegation implementation details. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyWriter.kt | Changes dependency reporting to prefer resolved versions from Gradle resolution results. |
| buildSrc/src/main/kotlin/io/spine/gradle/fs/SpineTempDir.kt | New per-JVM temp directory utility with shutdown cleanup hook. |
| buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt | Switches temp directory creation to use the shared per-JVM base directory. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt | Bumps fallback compiler versions. |
| base/src/test/kotlin/io/spine/compare/ComparatorRegistrySpec.kt | Adds tests validating supported-type exposure and snapshot semantics. |
| base/src/main/kotlin/io/spine/compare/ComparatorRegistry.kt | Adds types() API exposing registered comparator key types as a snapshot. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #951 +/- ##
=======================================
Coverage 94.02% 94.02%
=======================================
Files 192 192
Lines 4186 4187 +1
Branches 346 346
=======================================
+ Hits 3936 3937 +1
Misses 149 149
Partials 101 101 🚀 New features to boost your workflow:
|
armiol
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a public access method to
ComparatorRegistryfor retrieving all types that currently have a registered comparator.ComparatorRegistry.types(): Set<Class<*>>returns a defensive snapshot of the registered key types. Modifying the returned set does not affect the registry, and later registrations are not reflected in a previously obtained set.register/get/find/containsaccessors:@JvmStatic, single-expression body, KDoc documenting the snapshot contract.Tests
Three new cases in
ComparatorRegistrySpec:Timestamp,Duration);All 8 tests in the spec pass.
Version
Bumped
2.0.0-SNAPSHOT.422->2.0.0-SNAPSHOT.423and regenerated dependency reports. The deprecatedby extra(...)delegate inversion.gradle.ktswas migrated toextra.set(...).🤖 Generated with Claude Code